Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisations for wide datasets and deep trees #165

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

RAMitchell
Copy link
Contributor

This PR implements performance related changes specifically for deep trees and datasets with many features containing many unique values.

Changes:

  • Early exit in the scan kernel if there is no data in the node. Helps particularly at depth 16+
  • Sort positions at every tree level. This avoids some cases where the histogram kernel performs poorly due to uncoalesced memory access patterns.
  • Features per warp in histogram kernel reduced from 64 to 32. 32 is small enough for the relevant split proposals dataset to reside in cache for a large dataset such as the epsilon example.
  • The range of nodes in a batch may now be smaller if there is no data in some of the nodes. This avoids unecessary work at depth 16+ where the tree becomes sparse.

Some numbers from benchmark datasets below. In particular these changes take 100s off the epsilon dataset and 50s off the make_classification dataset at depth 16.

dataset max_depth legate-boost main this PR speedup
Airline 8 1.245634874 1.241300901 1.003491477
Wine 8 1.054035266 1.090040604 0.9669688103
YearPredictionMSD 8 2.963585854 3.030775468 0.9778308836
adult 8 1.899682442 2.239392916 0.8483024254
covtype 8 6.234697262 7.296711365 0.8544530474
epsilon 8 20.2478257 15.05816865 1.344640651
higgs 8 1.523515224 1.75222826 0.8694730357
kddcup99 8 1.687102954 2.199035088 0.7672014706
make_classification 8 16.75572141 9.628439347 1.740232327
make_regression 8 4.257078886 4.256365458 1.000167614
mnist 8 12.49057412 11.99881713 1.04098379
satimage 8 1.577708165 1.562127749 1.009973842
Airline 16 1.516509374 1.629086097 0.9308957806
Wine 16 1.538879077 1.301749945 1.182161815
YearPredictionMSD 16 22.34737364 16.77198386 1.332422797
adult 16 2.225321372 2.266909997 0.981654047
covtype 16 16.70189444 14.80063844 1.128457702
epsilon 16 252.728609 146.1095332 1.729720186
higgs 16 5.645470142 4.250000954 1.328345618
kddcup99 16 2.058086793 2.521029075 0.8163677337
make_classification 16 100.5729532 47.03877854 2.138085986
make_regression 16 27.51220608 14.34061035 1.918482227
mnist 16 105.7579037 57.82280366 1.828999928
satimage 16 4.297594468 2.413323959 1.780778106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant